home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_u_z / undocfct.zip / UNDOCFCT.DOC next >
Text File  |  1991-08-27  |  5KB  |  130 lines

  1. UNDOCFCT 1.0 - Print undocumented Windows/3 calls.
  2. Copyright D.J. Murdoch, 1991
  3.  
  4. Syntax:  UNDOCFCT filename [/A]
  5.  
  6.   will list all undocumented entry points and external references in a
  7.   Win/3 executable.
  8.  
  9. Options: /A - list all entries & references, documented or not.
  10.          /V - verbose mode; list location of every use of undocumented
  11.               calls, and list (undocumented) entry points in current file.
  12.  
  13. Examples:
  14.  
  15.   undocfct undocfct
  16.     - Shows the three undocumented function calls that Turbo Pascal for
  17.       Windows put into this program
  18.  
  19.   undocfct undocfct /a /v
  20.     - Shows a very long list of entry points for every routine in this
  21.       program, and all calls to Windows services, documented or not.
  22.  
  23.   undocfct krnl386 /v
  24.     - Shows the undocumented entry points in the Windows kernel.
  25.  
  26. Description:
  27.  
  28.   Many of the services that Windows 3.0 provides are undocumented,
  29.   because Microsoft wants to limit their use. This may be so that they
  30.   are free to change them in future releases; once an interface comes
  31.   into widespread use it's very unpopular to change it. It may also help
  32.   to protect the integrity of Windows if certain services are never used
  33.   except under very controlled conditions.
  34.  
  35.   This program is designed to examine executables, in order to see if
  36.   and how they're "breaking the rules" by using undocumented services. I
  37.   can see two reasons to do this: to see how someone has achieved the
  38.   seemingly impossible, and to identify programs that are likely to
  39.   break when the next release of Windows comes along.
  40.  
  41.   Note:  UNDOCFCT will run both as a DOS application from the command
  42.   line, and as a Windows application in Windows/3. As a DOS application,
  43.   output may be redirected to a file.
  44.  
  45. What is "undocumented"?
  46.  
  47.   The definition UNDOCFCT uses is very simple.  If a function is listed
  48.   in the version of WINDOWS.H that was distributed with Turbo Pascal for
  49.   Windows, then the function is documented.  Otherwise, it's
  50.   undocumented. This definition is a little too restrictive; some things
  51.   are documented elsewhere, so you're likely to see a few "undocumented"
  52.   references in just about every executable.
  53.  
  54.   If you find this unacceptable, the easiest thing to do is to get the
  55.   source code (see below) and modify it.  You might also choose to patch
  56.   UNDOCFCT.EXE; to do that, look for records of the form
  57.  
  58.    modulename : string[8];     { Counted string: 1 length byte, 8 chars }
  59.    documented : set of 0..511; { 64 byte bitmap for indices 0..511 }
  60.  
  61.   Remember to patch both the DOS copy and the Windows copy of the
  62.   record, and don't touch the fields in between these records.
  63.  
  64. Bugs and Warnings:
  65.  
  66.   External names of entry points are only given if the reference is by
  67.   name, or if UNDOCFCT can find the referenced module as
  68.   'modulename.EXE' or 'modulename.DLL' in the current directory, on
  69.   the path, or on a path given in an environment variable named
  70.   UNDOCFCT.
  71.  
  72.   If there are more than 512 entry points in a module, all but the first
  73.   512 will be treated as undocumented, and will show up multiple times.
  74.   External references by name rather than by index suffer from the same
  75.   bug.
  76.  
  77.   References are shown in the order they're encountered in the fixup
  78.   list in the file, not necessarily in any sort of natural order.
  79.  
  80.   If UNDOCFCT runs out of memory, it will probably die horribly, and may
  81.   crash your system.  I've run it in 100K with no trouble, but the more
  82.   complicated the file, the more memory it'll use.
  83.  
  84.   I wrote UNDOCFCT very quickly, and without any documentation for the
  85.   new executable format other than what I could guess for myself.  It
  86.   seems to work, but there are no guarantees that it will work on
  87.   programs I haven't tried, or on hardware other than my own.  Be
  88.   careful if you use it; don't trust it too much.
  89.  
  90. License:
  91.  
  92.   UNDOCFCT is not a public domain program.  It contains code whose
  93.   copyright belongs to D.J. Murdoch, as well as library code from
  94.   Borland International and TurboPower Software.
  95.  
  96.   You are free to use UNDOCFCT without charge.  You may distribute it
  97.   unmodified, together with this documentation file, provided that you
  98.   charge no more than distribution costs, and on no account more than
  99.   $10 per copy.
  100.  
  101. Source code:
  102.  
  103.   UNDOCFCT is written in Turbo Pascal, and compiled in versions TP 6.0
  104.   (the DOS part) and TPW 1.0 (the Windows part). The DOS part is the
  105.   stub for the Windows part, and was attached using my GLUE utility,
  106.   since TPW doesn't offer a choice of stub.
  107.  
  108.   Source code to UNDOCFCT is available at a cost of $25 (Canadian or
  109.   U.S. dollars).   Send your payment to me at the address below.
  110.   Recompiling requires one or two version(s) of Turbo Pascal, and some
  111.   routines from TurboPower Software's Object Professional library.
  112.  
  113. Warranty:
  114.  
  115.   There is no warranty of any kind with this program.  It is
  116.   experimental software, and likely contains bugs.  Use at your own
  117.   risk.
  118.  
  119. Note:  This is the first public release of UNDOCFCT.  Expect
  120. bugs.  If you find any, please send bug reports to me (Duncan Murdoch)
  121. at one of the following addresses:
  122.  
  123.  DJ Murdoch at Fidonet node 1:221/177.40
  124.  dmurdoch@watstat.waterloo.edu  on Internet
  125.  71631,122 on Compuserve
  126.  
  127.  79 John St. W
  128.  Waterloo, Ontario, Canada
  129.  N2L 1B7
  130.